﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Jackie.Utility;
using Jackie.Update.BusinessImpl;
using Jackie.Update.Entities;
using Jackie.Update.Entities.Server;
using Jackie.Update.IBusiness;

namespace Jackie.Update.WcfService
{
    public class PublishService : IPublish
    {
        private readonly PublishImpl serviceImpl;

        public PublishService()
        {
            serviceImpl = new PublishImpl();
        }

        public List<UpdateFileInfo> GetNewFiles(string systemName)
        {
            return serviceImpl.GetNewFiles(systemName);
        }

        public bool CheckSystemVersion(string systemName, string systemVersion)
        {
            return serviceImpl.CheckSystemVersion(systemName, systemVersion);
        }

        public void UpdateConfig(string systemName, PublishLogInfo publishLog)
        {
            serviceImpl.UpdateConfig(systemName, publishLog);
        }

        public string GetPublishDirectory(string systemName)
        {
            return serviceImpl.GetPublishDirectory(systemName);
        }
    }
}
